The present invention relates to transparently modifying an existing document and, in particular, to intercepting accesses to web pages and modifying the web page to add additional behavior.
Today""s computer networking environments, such as the Internet, offer mechanisms for delivering documents between heterogeneous computer systems. One such network, the World Wide Web network, which comprises a subset of Internet sites, supports a standard protocol for requesting and receiving documents known as web pages. This protocol is known as the Hypertext Transfer Protocol, or xe2x80x9cHTTP.xe2x80x9d HTTP defines a high-level message passing protocol for sending and receiving packets of information between diverse applications. Details of HTTP can be found in various documents including T. Berners-Lee et al., Hypertext Transfer Protocolxe2x80x94HTTP 1.0, Request for Comments (RFC) 1945, MIT/LCS, May 1996. Each HTTP message follows a specific layout, which includes among other information, a header which contains information specific to the request or response. Further, each HTTP request message contains a universal resource identifier (a xe2x80x9cURIxe2x80x9d), which specifies to which network resource the request is to be applied. A URI is either a Uniform Resource Locator (xe2x80x9cURLxe2x80x9d) or Uniform Resource Name (xe2x80x9cURNxe2x80x9d), or any other formatted string that identifies a network resource. The URI contained in a request message, in effect, identifies the destination machine for a message. URLs, as an example of URIs, are discussed in detail in T. Berners-Lee, et al., Uniform Resource Locators (URL), RVC 1738, CERN, Xerox PARC, Univ. of Minn., December 1994.
FIG. 1 illustrates how a browser application enables users to navigate among nodes on the web network by requesting and receiving web pages. For the purposes of this discussion, a web page is any type of document that abides by the HTML format. That is, the document includes an xe2x80x9c less than HTML greater than xe2x80x9d statement. Thus, a web page is also referred to as an HTML document. The HTML format is a document mark-up language, defined by the Hypertext Markup Language (xe2x80x9cHTMLxe2x80x9d) specification. HTML defines tags for specifying how to interpret the text and images stored in an HTML document. For example, there are HTML tags for defining paragraph formats and for emboldening and underlining text. In addition, the HTML format defines tags for adding images to documents and for formatting and aligning text with respect to images. HTML tags appear between angle brackets, for example,  less than HTML greater than . Further details of HTML are discussed in T. Berners-Lee and D. Connolly, Hypertext Markup Languagexe2x80x942.0, RFC 1866, MIT/W3C, November 1995.
In FIG. 1, a web browser application 101 is shown executing on a client computer 102, which communicates with a server computer 103 by sending and receiving HTML packets (messages). The web browser xe2x80x9cnavigatesxe2x80x9d to new locations on the network to browse (display) what is available at these locations. In particular, when the web browser xe2x80x9cnavigatesxe2x80x9d to a new location, it requests a new document from the new location (e.g., the server computer) by sending an HTTP-request message 104 using any well-known underlying communications wire protocol. The HTTP-request message follows the specific layout discussed above, which includes a header 105 and a URI field 106, which specifies the network location to which to apply the request. When the server computer specified by URI receives the HTTP-request message, it interprets the message packet and sends a return message packet to the source location that originated the message in the form of an HTTP-response message 107. In addition to the standard features of an HTTP message, such as the header 108, the HTTP-response message contains the requested HTML document 109. When the HTTP-response message reaches the client computer, the web browser application extracts the HTML document from the message, and parses and interprets (executes) the HTML code in the document and displays the document on a display screen of the client computer as specified by the HTML tags.
The World Wide Web is especially conducive to conducting electronic commerce (xe2x80x9ce-commercexe2x80x9d). E-commerce generally refers to commercial transactions that are at least partially conducted using the World Wide Web. For example, numerous web sites are available through which a user using a web browser can purchase items, such as books, groceries, and software. A user of these web sites can browse through an electronic catalog of available items to select the items to be purchased. To purchase the items, a user typically adds the items to an electronic shopping cart and then electronically pays for the items that are in the shopping cart. The purchased items can then be delivered to the user via conventional distribution channels (e.g., an overnight courier) or via electronic delivery when, for example, software is being purchased.
Many web sites that provide electronic catalogs, however, are not e-commerce enabled. That is, a user can browse through the catalog using a web browser, but the user cannot purchase the items in the catalog electronically. For example, a watch manufacturer may provide an electronic catalog:of all the watches made by the manufacturer. The catalog may include detailed specifications of the watches and may even include the retail price of the watches. Rather than allowing a user to purchase a watch electronically, the catalog may direct a user to a local retail merchant through which the watches can be purchased. It would be desirable to have a mechanism in which such web sites that are not e-commerce enabled could be easily enabled to conduct e-commerce. Many web sites also provide general information relating to various items. For example, a web site by a chamber of commerce may provide a high-level description of the hotels of a resort area. It would be desirable to have a mechanism in which such web sites could be enabled to allow users to make reservations at the various hotels or to obtain a more detailed description of hotels.
More generally, many web sites provide web pages relating to various items. These items may relate to things of any topic. The term xe2x80x9citemxe2x80x9d as used herein refers to any such thing. For example, an item can include an historical topic, a medical topic, a current event topic, a product, a service and so on. In general, it would be desirable to have a mechanism in which web pages from such web sites can be augmented with additional behavior. Such additional behavior may allow for the e-commerce enabling of web pages or for the providing additional information.
A method and system for enabling a page description provided by a source server to perform additional behavior provided by a portal server is provided. The additional behavior may include new behavior or a modification of existing behavior. The page description (e.g., an HTML document) is associated with one or more items (e.g, a product). The enabling system executes at the portal server and receives a selection of the page description (e.g., a URL) from a client computer. The enabling system then retrieves from the source server the selected page description. The enabling system modifies the retrieved page description so that the additional behavior can be performed in response to user input. For example, the enabling system may add to the retrieved page description a user interface element that, when selected, causes the additional behavior (e.g., placing an order for the product) to be performed based on the item associated with the page description. The enabling system may also redirect to the portal server the navigation references of the retrieved page description so that all navigation based on the page description is routed through the portal server. When the enabling system intercepts these redirected navigation references, it can then retrieve and enable the referenced page description. Alternatively, the enabling system may use a proxy server to intercept navigation references. In one embodiment, the additional behavior is the providing of information that is not provided by the source server. In another embodiment, the additional behavior is the adding of the item to an electronic shopping cart. The user interface element may be a button that a user selects to activate the additional behavior or may be a more complex user interface such as a frame that contains various options.